package com.bloveoacom.weichi.model;


import com.bloveoacom.base.UserInfoBean;
import com.bloveoacom.http.HttpMethods;
import com.bloveoacom.http.HttpResult;
import com.bloveoacom.weichi.bean.ItemOptionBean;
import com.bloveoacom.weichi.bean.UserBean;
import com.bloveoacom.weichi.contract.MineContract;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.Flowable;

/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/8/22
 * desc  : 我的
 */
public class MineModel implements MineContract.Model {



    @Override
    public void onDestroy() {

    }

    @Override
    public List<ItemOptionBean> getOps() {
        List<ItemOptionBean> ops = new ArrayList<>();
        ItemOptionBean itemOptionBean = new ItemOptionBean(-1, -1, -1, "评审列表", "");
        ops.add(itemOptionBean);
        itemOptionBean = new ItemOptionBean(-1, -1, -1, "购票记录", "");
        ops.add(itemOptionBean);
        itemOptionBean = new ItemOptionBean(-1, -1, -1, "我的收藏", "");
        ops.add(itemOptionBean);
        itemOptionBean = new ItemOptionBean(-1, -1, -1, "邀请好友", "");
        ops.add(itemOptionBean);
        itemOptionBean = new ItemOptionBean(-1, -1, -1, "联系我们", "");
        ops.add(itemOptionBean);
        itemOptionBean = new ItemOptionBean(-1, -1, -1, "设置", "");
        ops.add(itemOptionBean);
        return ops;
    }

    @Override
    public Flowable<HttpResult<UserBean>> getUserInfo() {
        return HttpMethods.getInstance().getHttpService().getUserInfo(UserInfoBean.getInstance().getToken());
    }

    @Override
    public Flowable<HttpResult<Object>> userSignIn() {
        return HttpMethods.getInstance().getHttpService().userSignIn(UserInfoBean.getInstance().getToken());
    }
}
